package com.wzc.basic.util;

import lombok.Data;

/**
 * 封装工具类：返回的操作结果
 */
@Data
public class AjaxResult {

    private Boolean success = true;
    private String msg = "操作成功";

    private Object resultObj;


    public static AjaxResult me(){
        return new AjaxResult();
    }

    // 链式语法
    public AjaxResult setMsg(String msg) {
        this.success = false;
        this.msg = msg;
        return this;
    }


    public AjaxResult setResultObj(Object msg) {
        this.resultObj = msg;
        return this;
    }




}
